﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Web.Mvc;

namespace MvcWeb.ViewModels.Home
{
    public class LoginModel
    {
        [Required]
        [Display(Name = "登录名")]
        public string UserName { get; set; }
        [Required]
        [Display(Name = "密　码")]
        public string Password { get; set; }
        public string Error { get; set; }
    }

    public class ChangePasswordModel
    {
        [Required]
        [Display(Name = "原密码")]
        public string OldPwd { get; set; }
        [Required]
        [Display(Name = "新密码")]
        [Compare("ConfirmPwd", ErrorMessage = "两次密码不匹配")]
        [StringLength(32, ErrorMessage = "{0}长度至少为{2}", MinimumLength = 6)]
        public string NewPwd { get; set; }
        [Required]
        [Display(Name = "确认密码")]
        public string ConfirmPwd { get; set; }
        public string Messages { get; set; }
    }
}